<!doctype html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
    <title>提现数据</title>
    <link rel="stylesheet" href="../style/base.css">
    <link rel="stylesheet" href="../style/layout.css">
    <script src="https://cdn.bootcss.com/jquery/3.2.0/jquery.min.js"></script>
    <script src="../js/paramsTool.js"></script>
    <script src="../../js/layer.js"></script>
</head>
<style type="text/css">
    .top{width:100%; height:60px; line-height:60px; text-align:center; background:#36a2f9; color:#fff; font-size:18px;}
    .top #extract{position: absolute; right: 5px;top: 0px;font-size:14px; height: 60px; line-height: 60px; width: 100px;}
    .top #cashList{position: absolute; left: 5px;top: 0px;font-size:14px; height: 60px; line-height: 60px; width: 100px;}
    .listnum1{background:#f7f7f7;width:100%;height:30px; line-height:30px;border-top:1px solid #ddd;border-bottom:1px solid #ddd;}
    .listnum1 .left{float:left;width:30%;color:#898989;margin-left:5%;font-size:14px;}
    .listnum1 .right{float:left;width:50%;color:#898989;font-size:14px;}
    /***战友团明细***/
    .infoline_bands{width:100%;height:58px;padding:1px 0;border-bottom: solid #f0efef 1px; display:block; overflow:hidden;background:#fff; font-weight:100;}
    .infoline_bands .infopic{width:30%; float:left;line-height:58px;  padding: 0 5px;}
    .infoline_bands .infopic img{width:40px; height:40px;border-radius:100%; border:1px solid #CCC;margin:3px 0 0 0px;}
    .infoline_bands .infotxt{float:left;width: 40%; text-align:left; margin-top: 7px; line-height: 1.5; padding: 0 5px; }
    .infoline_bands .infotxt .name{padding-top:5px;text-align:left; font-weight:bold; font-size:12px;float:left;overflow:hidden; color:#000;}
    .infoline_bands .infotxt .time{padding:0px 2px 0 0; clear:both; min-height:18px;text-align:left; font-size:10px; float:left;display:block; font-weight:bold; overflow:hidden;}
    .infoline_bands .infori{width: 25%;float: left;text-align: right;}
    .infoline_bands .infori >div{padding-top: 7px;}


</style>
<script>
    var host = window.location.origin;
    var params = queryString();
    var disOpenid;
    if(params.disOpenid){
        disOpenid = params.disOpenid;
    }else {
        disOpenid = getCookie('disOpenid');
    }

    if(!disOpenid){
        getDisWxCode();
    }

    //dataNum
    var totalMoney = 0;
    var todMoney = 0;

    $(function () {

        var layInd = layer.open({
            type: 2,
            content:'加载中...',
            success : function () {
                $.ajax({
                    url: host+ '/getDisOrders',
                    type: "get",
                    dataType:'json',
                    async:true,//请求是否异步，默认为异步，这也是ajax重要特性
                    cache:false,
                    headers: {"content-type":"application/json","disopenid":disOpenid},
                    success:function(data){
                        if(data.code){
                            layer.close(layInd);        //关闭遮罩
                            alert('error:'+data.info);
                        }else {

                            var lists = data.orders;
                            for(var i = 0;i<lists.length;i++){
                                totalMoney+=lists[i].totalFee;
                                if(new Date().toDateString() == new Date(lists[i].payDate).toDateString()){
                                    todMoney+= lists[i].totalFee;
                                }
                                var infoBan=$("<div></div>").addClass('infoline_bands');
                                var infopic=$("<div></div>").addClass('infopic').appendTo(infoBan);
                                $("<div style='color: #36a2f9; font-size: 14px; font-weight: 600;'>充值: "+lists[i].totalFee/100+"</div>").appendTo(infopic);
                                var infotxt = $("<div></div>").addClass('infotxt').appendTo(infoBan);
                                var name = $("<div>ID:"+lists[i].uid+"</div>").addClass('name').appendTo(infotxt);
                                var time = $("<div>"+dateFormate(lists[i].payDate)+"</div>").addClass('time').appendTo(infotxt);

                                infoBan.appendTo($('#band'));
                            }

                            $('#total').html(totalMoney/100);
                            $('#todCash').html(todMoney/100);

                            layer.close(layInd);        //关闭遮罩
                        }
                    },
                    error:function() {
                        layer.close(layInd);        //关闭遮罩
                        location.reload();
                    }
                });
            }
        });
    });

</script>
<body>
<!--顶部bar-->
<div class="top">
    充值总额: <label id="total" style="font-weight: 600">0</label>
</div>
<!--顶部bar结束-->
<div class="listnum1">
    <div class="left">
        今日充值:<label id="todCash" style="color:#36a2f9;font-weight: 600">0</label>
    </div>
</div>
<div id="band">

</div>
</body>
</html>